package cn.com.yky.domain;

import cn.com.yky.domain.share.Exam;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by zhengmin on 2017/2/4.
 */
@Entity
public class UnionExam extends Exam{

    private Integer year;
    private Integer month;

    @OneToMany(cascade = CascadeType.ALL)
    @JoinColumn(name = "examId")
    private List<Question> questions = new ArrayList<>();

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    public Integer getMonth() {
        return month;
    }

    public void setMonth(Integer month) {
        this.month = month;
    }

    public List<Question> getQuestions() {
        return questions;
    }

    public void setQuestions(List<Question> questions) {
        this.questions = questions;
    }
}
